<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">

    <body>

        <ui:composition template="./../Template.xhtml">

           

            <ui:define name="content">
                
                <h:form id="planoacao2">
                    
                      <p:growl id="message2"/>
                    
                            <p:panelGrid columns="2">
                                <f:facet name="header">
                                    <h:outputText value="Relatório Mensal do LEI"/>
                                </f:facet>
                                <h:outputText value="Escola.:"/>
                                <p:selectOneMenu value="#{relatMensalFaces.selectedEscola}" converter="EscolaConverter" required="true" label="Escola">
                                    <f:selectItem value="#{null}" itemLabel="Selecione"/>
                                    <f:selectItems value="#{escolaFaces.allEscolas}" var="esc" itemLabel="#{esc.escola}" itemValue="#{esc}"/>
                                    <p:ajax update="selectprof" listener="#{relatMensalFaces.findProfessorPorEscola()}" immediate="false"/>
                                </p:selectOneMenu>
                                
                                <h:outputText value="Professor.:"/>
                                <p:selectOneMenu value="#{relatMensalFaces.selectedProfessor}" converter="ProfessorConverter" id="selectprof" required="true" label="professor">
                                    <f:selectItem value="#{null}" itemLabel="Selecione"/>
                                    <f:selectItems value="#{relatMensalFaces.professores}" var="prof" itemLabel="#{prof.nome}" itemValue="#{prof}"/>
                                 
                                </p:selectOneMenu>
                            </p:panelGrid>
                      <br/><br/>
                      <p:commandButton  icon="img-new-Report"  action="#{relatMensalFaces.gerarRelatorioPlanoPDF()}" ajax="false" onclick="this.form.target = '_blank'" update="planoacao2"/>
                      
                     </h:form>
            </ui:define>
      
           

        </ui:composition>

    </body>
</html>
